package com.lagou.service.impl;

import com.lagou.entity.ResumeEntity;
import com.lagou.repository.ResumeRepository;
import com.lagou.service.IResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResumeServiceImpl implements IResumeService {
    @Autowired
    private ResumeRepository resumeRepository;

    @Override
    public List<ResumeEntity> findAll() {
        return resumeRepository.findAll();
    }

    @Override
    public ResumeEntity findByName(String name) {
        return resumeRepository.findByName(name);
    }

    @Override
    public ResumeEntity insert(ResumeEntity resume) {
        return resumeRepository.insert(resume);
    }

    @Override
    public void deleteByNameIsLike(String name) {
        resumeRepository.deleteByNameIsLike(name);
    }
}
